package com.dlwx.firefighting.adapter;

import android.content.Context;
import android.widget.TextView;

import com.dlwx.firefighting.R;
import com.dlwx.firefighting.bean.FxMoneyBean;

/**
 * Created by Administrator on 2017/9/6.
 */

public class FxMoneyAdapter extends ListBaseAdapter<FxMoneyBean> {
    private Context context;
    public FxMoneyAdapter(Context context) {
        super(context);
        this.context=context;
    }

    @Override
    public int getLayoutId() {
        return R.layout.item_fx_money;
    }

    @Override
    public void onBindItemHolder(SuperViewHolder holder, int position) {
        FxMoneyBean bean = getDataList().get(position);
        TextView moneyTv=holder.getView(R.id.money_tv);
        TextView statusTv=holder.getView(R.id.status_tv);
        TextView nameTv=holder.getView(R.id.name_tv);
        TextView timeTv=holder.getView(R.id.time_tv);
//
        moneyTv.setText(context.getString(R.string.rmb)+bean.getMoney());
        statusTv.setText(bean.getStatus());
        nameTv.setText("用户名："+bean.getUser_name());
        timeTv.setText("时间："+bean.getAdd_time());

    }
}
